<?php
defined('IN_ADMIN') or exit('No permission resources.');
$show_validator = true;
include $this->admin_tpl('header');
?>
<script type="text/javascript">
<!--
$(function(){
	
	$.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
	$("#path").formValidator({onshow:"请输入目录",onfocus:"目录不能为空"})
		.inputValidator({min:1,max:64,onerror:"编码不能为空"})
		.regexValidator({regexp:"^[A-Za-z0-9\\u4E00-\\u9FA5\\uF900-\\uFA2D_/]+$",onerror:"用户名只能为字母和数字"});
			
	$("#name").formValidator({onshow:"请输入名称",onfocus:"名称不能为空"})
		.inputValidator({min:1,max:64,onerror:"名称不能为空"});		
})
//-->
</script>
<div class="pad_10">
<div class="common-form">
<form name="myform" action="?m=<?php echo ROUTE_M;?>&c=<?php echo ROUTE_C;?>&a=edit" method="post" id="myform">
<input type="hidden" name="id" id="id" value="<?php echo $id;?>"/>
<input type="hidden" name="sid" id="sid" value="<?php echo $sid;?>"/>
<table width="100%" class="table_form contentWrap">
<tr>
<td  width="80">目录</td> 
<td><input type="text" name="info[path]" value="<?php echo $path;?>" class="input-text" id="path"></input></td>
</tr> 
<tr>
  <td>分组</td> 
  <td><?php foreach($group_list as $g){
	  $chk = '';
	  if($a_gids && in_array($g['id'],$a_gids))$chk = ' checked';
	  ?><label><input name="groups[]" type="checkbox" id="groups_<?php echo $g['id'] ;?>" value="<?php echo $g['id'];?>"<?php echo $chk;?>>
    <?php echo $g['name'];?> </label><?php } ?></td>
</tr>
<tr>
  <td>权限</td>
  <td>
  <?php foreach(array(array('id'=>1,'name'=>'读'),array('id'=>2,'name'=>'写')) as $g){
	  $chk = '';
	  $jsck = '';
	  if($a_gids && in_array($g['id'],$r_ids[$rw]))$chk = ' checked';
	  if($g['id']==2)$jsck = ' onclick="if(this.checked)$(\'#rw_1\').attr(\'checked\',true);"';
	  ?><label><input name="rw[]" type="checkbox" id="rw_<?php echo $g['id'] ;?>" <?php echo $jsck;?> value="<?php echo $g['id'];?>"<?php echo $chk;?>>
    <?php echo $g['name'];?> </label><?php } ?>
 </td>
</tr>


 
</table>

    <div class="bk15"></div>
    <input name="dosubmit" type="submit" value="<?php echo L('submit')?>" class="dialog" id="dosubmit">
</form>

</div></div>
</body>
</html>



